package fr.tannoy.controls
{
	import mx.controls.TextArea;

	public class WikiTextArea extends TextArea
	{
		public function WikiTextArea()
		{
			super();
		}
		
		public function replaceText(newText:String):void {
			var startIndex:int = textField.selectionBeginIndex;
			var endIndex:int = textField.selectionEndIndex;
			textField.replaceText(startIndex,endIndex,newText);
			text = textField.text;
		}
	}
}